<?

session_start();
require_once('cruds.php');
include('config.php');

$id = $_GET['idproduk'];

$dis_cruds = new CRUDS();
$dis_cruds -> set_table ('produk');
$res=$dis_cruds->select_all();

$produk_arr = array();
while($row=mysql_fetch_array($res)){

	$produk_arr['NAMAPRODUK']=$row['NAMAPRODUK'];
	$produk_arr['KUANTITAS']=$row['KUANTITAS'];
	$produk_arr['HARGASAT']=$row['HARGASAT'];
	$produk_arr['KETERSEDIAAN']=$row['KETERSEDIAAN'];
	$produk_arr['BERLAKU']=$row['BERLAKU'];
	$produk_arr['DESKRIPSI']=$row['DESKRIPSI'];
}

$_SESSION['infoproduk'] = $produk_arr;
header('Location: /GUI/editproduk_view.php');


?>
